<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      function min(x, y) {
        return x > y ? y : x;
      }
      // console.log(min(10, 8)); //8
      // console.log(min(4, 8)); //4

      // function pow(x, y) {
      //   return x ** y;
      // }

      function pow(x, y) {
        let r = 1;
        for (let i = 0; i < y; i++) {
          r = r * x;
        }
        return r;
      }
      console.log(pow(2, 3));
      console.log(pow(3, 2));
    </script>
  </body>
</html>
